package com.pignest.hotel.beans;

import com.pignest.framework.util.Utils;
import com.pignest.hotel.annotation.Bean;
import com.pignest.hotel.beans.global.BaseBean;
import com.pignest.hotel.system.Global;

/**
 * 房间类型
 * */
@Bean("房间类型")
public class RoomType extends BaseBean {
	private static final long serialVersionUID = -4363881141030960042L;
	
	/** 类型名称 */
	private String name;
	/** 名称简称 */
	private String shortName;
	/** 颜色 */
	private String color;
	/** 容量, 可入住几个人 */
	private int capacity;
	/** 基本房价, 会员可享受会员价另外设置 */
	private int price;
//	/** 特征 */
//	private String feature;
	/**
	 * 最低房价
	 * */
	private int minPrice;
	
	/** 半天房价 */
	private int halfDayPrice;
	/** 最低半天房价 */
	private int minHalfDayPrice;
	/**
	 * 房间钟点价格(一个单位/3小时)
	 * */
	private int hourPrice;
	/** 钟点最低价 */
	private int minHourPrice;
	/** 备注 */
	private String remark;
	
	public RoomType() {
	}
	
	public RoomType(String name, String color, int capacity, int price, int minPrice, int hourPrice, int minHourPrice, int halfDayPrice, int minHalfDayPrice) {
		this.name = name;
		this.color = color;
		this.capacity = capacity;
		this.price = price;
		this.minPrice = minPrice;
		this.hourPrice = hourPrice;
		this.minHourPrice = minHourPrice;
		this.halfDayPrice = halfDayPrice;
		this.minHalfDayPrice = minHalfDayPrice;
	}
	
	public RoomType(String name, String color, int capacity, int price, String remark) {
		this.name = name;
		this.color = color;
		this.capacity = capacity;
		this.price = price;
		this.remark = remark;
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getPrice() {
		return price;
	}
	public void setPrice(int price) {
		this.price = price;
	}
	public int getMinPrice() {
		return minPrice;
	}
	public void setMinPrice(int minPrice) {
		this.minPrice = minPrice;
	}
	public int getHourPrice() {
		return hourPrice;
	}
	public void setHourPrice(int hourPrice) {
		this.hourPrice = hourPrice;
	}
	public int getHalfDayPrice() {
		return halfDayPrice;
	}
	public void setHalfDayPrice(int halfDayPrice) {
		this.halfDayPrice = halfDayPrice;
	}
	public int getMinHalfDayPrice() {
		return minHalfDayPrice;
	}
	public void setMinHalfDayPrice(int minHalfDayPrice) {
		this.minHalfDayPrice = minHalfDayPrice;
	}
//	public String getFeature() {
//		return feature;
//	}
//	public void setFeature(String feature) {
//		this.feature = feature;
//	}
	public String getColor() {
		return color;
	}
	public void setColor(String color) {
		this.color = color;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public int getCapacity() {
		return capacity;
	}
	public void setCapacity(int capacity) {
		this.capacity = capacity;
	}
	public int getMinHourPrice() {
		return minHourPrice;
	}
	public void setMinHourPrice(int minHourPrice) {
		this.minHourPrice = minHourPrice;
	}
	public String getShortName() {
		return shortName;
	}
	public void setShortName(String shortName) {
		this.shortName = shortName;
	}
	
	public String getColorName() {
		return Global.getColorName(color);
	}
	public String getFormattedPrice() {
		return Utils.toPrice(price);
	}
	public String getFormattedMinPrice() {
		return Utils.toPrice(minPrice);
	}
	public String getFormattedHourPrice() {
		return Utils.toPrice(hourPrice);
	}
	public String getFormattedMinHourPrice() {
		return Utils.toPrice(minHourPrice);
	}
	public String getFormattedHalfDayPrice() {
		return Utils.toPrice(halfDayPrice);
	}
	public String getFormattedMinHalfDayPrice() {
		return Utils.toPrice(minHalfDayPrice);
	}
	
	@Override
	public String toSimpleString() {
		return concat(name, String.valueOf(price));
	}
}
